The File note type can be used to attach various external files such as images, videos or PDF documents.
Since these files come from an external source, it is not possible to create a File note type directly:
PDFs can be browsed directly from Trilium.
Interaction:
Interaction:
Video files can be added in as well. The file is streamed directly, so when accessing the note from a server it doesn't have to download the entire video to start playing it.
Adding a supported audio file will reveal a basic audio player that can be used to play it.
Interactions:
Files that are identified as containing text will show a preview of their content. One common use case for this type of file is to embed text files whose content is not necessarily of interest to the user, such as third-party libraries or generated content, that can then be downloaded if needed.
Note that generally text files will be imported as either Text or Code notes. To bypass this behavior and create a File note type, use the Import into note feature and uncheck Import HTML, Markdown and TXT as text notes, as well as Import recognized code files as code notes.
Since one of the use cases for having files instead of notes is to display large files, the content preview is limited to a relatively small amount of characters. To view the full file, consider opening it in an external application.
If the file could not be identified as any of the supported file types from above, it will be treated as an unknown file. In this case, all the default interactions will be available such as downloading or opening the file externally, but there will be no preview of the content.
Files are also displayed in the Note List based on their type:
Non-image files can be embedded into text notes as read-only widgets via the Include Note functionality.
Image files can be embedded into text notes like normal images via Image references.